/**
 * Sprite Framework.
 *
 * Released under Apache License, Version 2.0.
 */

package bsp.android.spritefwk;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class ImageHolder
{
	protected int mID;
	protected Bitmap mBitmap;
	
	public ImageHolder()
	{
		mID = 0;
		mBitmap = null;
	}
	
	public ImageHolder(Resources res, int id)
	{
		mID = id;
		mBitmap = BitmapFactory.decodeResource(res, mID);
	}
	
	public int getWidth()
	{
		return mBitmap.getWidth();
	}
	
	public int getHeight()
	{
		return mBitmap.getHeight();
	}
	
	public Bitmap getGraphic()
	{
		return mBitmap;
	}
	
	public void cleanup()
	{
		mBitmap = null;
	}
}

/* end */
